Import and process data

Learning

Model: Correct responses by age, trial, block number, and block condition

  correct_response_made
Predictors Odds Ratios SE
age scaled 1.2779 0.0482
learning trial scaled 1.6933 0.0341
reward condition1 1.6760 0.0456
block number scaled 1.2739 0.0359
age scaled × learning
trial scaled
1.1295 0.0228
age scaled × reward
condition1
1.0923 0.0298
learning trial scaled ×
reward condition1
1.1689 0.0181
age scaled × block number
scaled
0.9848 0.0280
learning trial scaled ×
block number scaled
1.0768 0.0177
reward condition1 × block
number scaled
1.0705 0.0246
age scaled × learning
trial scaled × reward
condition1
1.0624 0.0167
(age scaled × learning
trial scaled) × block
number scaled
1.0138 0.0170
(age scaled × reward
condition1) × block
number scaled
0.9966 0.0232
(learning trial scaled ×
reward condition1) ×
block number scaled
1.0220 0.0159
(age scaled × learning
trial scaled × reward
condition1) × block
number scaled
1.0148 0.0161
Random Effects
σ2 3.29
τ00 subject_id 0.17
τ11 subject_id.re1.learning_trial_scaled 0.02
τ11 subject_id.re1.reward_condition1 0.07
τ11 subject_id.re1.block_number_scaled 0.08
τ11 subject_id.re1.learning_trial_scaled_by_reward_condition1 0.00
τ11 subject_id.re1.learning_trial_scaled_by_block_number_scaled 0.01
τ11 subject_id.re1.reward_condition1_by_block_number_scaled 0.04
τ11 subject_id.re1.learning_trial_scaled_by_reward_condition1_by_block_number_scaled 0.00
ρ01  
ρ01  
ICC 0.05
N subject_id 151
Observations 38352
Marginal R2 / Conditional R2 0.161 / 0.203

Figure 2A: Correct response by block condition, stimulus repetition, and age group

Supplementary Figure: Correct response by block condition and block number

Figure 2B: Generalization by block condition, category repetition, age group

Model: Correct response to first appearance of each stimulus

  correct_response_made
Predictors Odds Ratios SE
age scaled 1.0717 0.0245
category rep scaled 1.2596 0.0295
reward condition1 1.7317 0.0458
block number scaled 1.0951 0.0246
age scaled × category rep
scaled
1.0698 0.0252
age scaled × reward
condition1
1.0792 0.0286
category rep scaled ×
reward condition1
1.3324 0.0312
age scaled × block number
scaled
1.0003 0.0227
category rep scaled ×
block number scaled
1.0504 0.0245
reward condition1 × block
number scaled
1.0957 0.0246
age scaled × category rep
scaled × reward
condition1
1.0881 0.0257
(age scaled × category
rep scaled) × block
number scaled
1.0288 0.0243
(age scaled × reward
condition1) × block
number scaled
1.0027 0.0227
(category rep scaled ×
reward condition1) ×
block number scaled
1.0722 0.0250
(age scaled × category
rep scaled × reward
condition1) × block
number scaled
1.0346 0.0244
Random Effects
σ2 3.29
τ00 subject_id 0.01
τ11 subject_id.re1.block_number_scaled 0.01
τ11 subject_id.re1.reward_condition1 0.03
τ11 subject_id.re1.block_number_scaled_by_reward_condition1 0.01
ρ01  
ρ01  
ICC 0.00
N subject_id 151
Observations 11267
Marginal R2 / Conditional R2 0.116 / 0.118

Supplementary Figure: Generalization by trial, reward condition, and block number

Figure 2C: WSLS by age group

Supplementary Figure: WSLS by block number

Model: Category win-stay lose-shift

  WSLS
Predictors Odds Ratios SE
age scaled 1.1791 0.0378
learning trial scaled 1.1812 0.0180
reward condition1 2.4283 0.0719
block number scaled 1.1835 0.0243
age scaled × learning
trial scaled
1.0659 0.0166
age scaled × reward
condition1
1.1856 0.0351
learning trial scaled ×
reward condition1
1.3255 0.0202
age scaled × block number
scaled
0.9832 0.0204
learning trial scaled ×
block number scaled
1.0061 0.0153
reward condition1 × block
number scaled
1.1665 0.0181
age scaled × learning
trial scaled × reward
condition1
1.0783 0.0168
(age scaled × learning
trial scaled) × block
number scaled
1.0220 0.0158
(age scaled × reward
condition1) × block
number scaled
1.0060 0.0159
(learning trial scaled ×
reward condition1) ×
block number scaled
1.0192 0.0155
(age scaled × learning
trial scaled × reward
condition1) × block
number scaled
0.9944 0.0154
Random Effects
σ2 3.29
τ00 subject_id 0.11
τ11 subject_id.re1.reward_condition1 0.09
τ11 subject_id.re1.block_number_scaled 0.03
ρ01  
ρ01  
ICC 0.03
N subject_id 151
Observations 35986
Marginal R2 / Conditional R2 0.216 / 0.243

Stats: WSLS in first 10 trials

reward_condition mean_WSLS se_WSLS
Category-Predictive 0.5956 0.01045
Exemplar-Predictive 0.5899 0.01063

Memory

Memory delay stats

mean_delay sd_delay min_delay max_delay
7.132 1.3 6 10
age_group mean_delay sd_delay min_delay max_delay
Children 7.2 1.325 6 10
Adolescents 7.38 1.323 6 10
Adults 6.824 1.212 6 10

Supplementary Figure: AUC values by stimulus repetitions, block condition, age group

Model: AUC values by stimulus repetitions, block condition, age

  AUC
Predictors Estimates SE
age scaled 0.01 0.01
reward condition1 -0.01 0.00
stim rep scaled 0.04 0.00
age scaled × reward
condition1
-0.00 0.00
age scaled × stim rep
scaled
-0.00 0.00
reward condition1 × stim
rep scaled
0.00 0.00
(age scaled × reward
condition1) × stim rep
scaled
0.00 0.00
Random Effects
σ2 0.00
τ00 subject_id 0.01
ICC 0.60
N subject_id 151
Observations 912
Marginal R2 / Conditional R2 0.162 / 0.662

Figure 3A: AUC values by age group, memory specificity, block condition

Model: AUCs by age, reward condition, memory specificity

  AUC
Predictors Estimates SE
age scaled 0.0159 0.0069
reward condition1 -0.0084 0.0024
foil type1 0.0600 0.0024
age scaled × reward
condition1
-0.0042 0.0024
age scaled × foil type1 0.0021 0.0024
reward condition1 × foil
type1
0.0013 0.0024
age scaled × reward
condition1 × foil type1
0.0016 0.0024
Random Effects
σ2 0.00
τ00 subject_id 0.01
ICC 0.63
N subject_id 151
Observations 608
Marginal R2 / Conditional R2 0.286 / 0.739

Model: AUCs by age, reward condition, foil type, memory delay

  AUC
Predictors Estimates SE
age scaled 0.0123 0.0069
reward condition1 -0.0083 0.0025
foil type1 0.0598 0.0025
memory delay scaled -0.0148 0.0068
age scaled × reward
condition1
-0.0038 0.0025
age scaled × foil type1 0.0016 0.0025
reward condition1 × foil
type1
0.0014 0.0025
age scaled × memory delay
scaled
-0.0137 0.0069
reward condition1 ×
memory delay scaled
0.0021 0.0025
foil type1 × memory delay
scaled
-0.0026 0.0025
age scaled × reward
condition1 × foil type1
0.0019 0.0025
(age scaled × reward
condition1) × memory
delay scaled
0.0013 0.0025
(age scaled × foil type1)
× memory delay scaled
-0.0020 0.0025
(reward condition1 × foil
type1) × memory delay
scaled
-0.0001 0.0025
(age scaled × reward
condition1 × foil type1)
× memory delay scaled
0.0021 0.0025
Random Effects
σ2 0.00
τ00 subject_id 0.01
ICC 0.62
N subject_id 151
Observations 604
Marginal R2 / Conditional R2 0.312 / 0.738

Supplementary Figure: AUC values with delay

RL modeling

Choice weights

Figure 2E: Distribution of choice weights

Model: Choice weights by block condition and age

  est
Predictors Estimates SE
abstraction1 -0.4633 0.0371
reward condition1 0.2448 0.0371
age scaled 0.1835 0.0507
abstraction1 × reward
condition1
0.3241 0.0371
abstraction1 × age scaled -0.0723 0.0371
reward condition1 × age
scaled
0.0542 0.0371
(abstraction1 × reward
condition1) × age scaled
0.0567 0.0371
Random Effects
σ2 0.83
τ00 subject_id 0.18
ICC 0.18
N subject_id 151
Observations 604
Marginal R2 / Conditional R2 0.296 / 0.422

Model: Exemplar choice weights across conditions

  est
Predictors Estimates SE
reward condition1 -0.0794 0.0421
Random Effects
σ2 0.53
τ00 subject_id 0.59
ICC 0.52
N subject_id 151
Observations 302
Marginal R2 / Conditional R2 0.006 / 0.526

Model: Category choice weights across conditions

  est
Predictors Estimates SE
reward condition1 0.5689 0.0509
Random Effects
σ2 0.78
τ00 subject_id 0.20
ICC 0.20
N subject_id 151
Observations 302
Marginal R2 / Conditional R2 0.250 / 0.400

Relations between choice weights and points earned

## Mixed Model Anova Table (Type 3 tests, S-method)
## 
## Model: total_points ~ age_scaled * beta_scaled * abstraction * reward_condition + 
## Model:     (1 | subject_id)
## Data: beta_ests_points
##                                                 Effect        df         F
## 1                                           age_scaled 1, 178.00 24.91 ***
## 2                                          beta_scaled 1, 529.48 19.81 ***
## 3                                          abstraction 1, 462.63      0.29
## 4                                     reward_condition 1, 447.92      0.56
## 5                               age_scaled:beta_scaled 1, 533.11    4.66 *
## 6                               age_scaled:abstraction 1, 463.17      1.14
## 7                              beta_scaled:abstraction 1, 499.31      1.72
## 8                          age_scaled:reward_condition 1, 448.06      0.17
## 9                         beta_scaled:reward_condition 1, 459.48      0.98
## 10                        abstraction:reward_condition 1, 455.16      1.90
## 11                  age_scaled:beta_scaled:abstraction 1, 506.72      0.31
## 12             age_scaled:beta_scaled:reward_condition 1, 456.20      0.84
## 13             age_scaled:abstraction:reward_condition 1, 452.91      0.15
## 14            beta_scaled:abstraction:reward_condition 1, 472.29 46.96 ***
## 15 age_scaled:beta_scaled:abstraction:reward_condition 1, 471.98      0.01
##    p.value
## 1    <.001
## 2    <.001
## 3     .591
## 4     .455
## 5     .031
## 6     .286
## 7     .190
## 8     .681
## 9     .322
## 10    .169
## 11    .576
## 12    .360
## 13    .700
## 14   <.001
## 15    .906
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
## 
## Call:
## lm(formula = total_points ~ est, data = beta_ests_points_c_c)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -279.190  -35.267    4.625   38.436  106.329 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  101.430      7.660  13.241  < 2e-16 ***
## est           38.762      4.837   8.013 2.99e-13 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 56.58 on 149 degrees of freedom
## Multiple R-squared:  0.3012, Adjusted R-squared:  0.2965 
## F-statistic: 64.21 on 1 and 149 DF,  p-value: 2.986e-13
## 
## Call:
## lm(formula = total_points ~ est, data = beta_ests_points_e_c)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -267.742  -34.803    7.474   43.234  123.277 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   133.74       8.64  15.480   <2e-16 ***
## est            10.84       4.37   2.482   0.0142 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 66.33 on 149 degrees of freedom
## Multiple R-squared:  0.03969,    Adjusted R-squared:  0.03324 
## F-statistic: 6.158 on 1 and 149 DF,  p-value: 0.01419
## 
## Call:
## lm(formula = total_points ~ est, data = beta_ests_points_c_e)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -324.49  -44.22    2.05   55.39  193.40 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  158.021      7.093   22.28   <2e-16 ***
## est           -6.648      6.924   -0.96    0.339    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 86.48 on 149 degrees of freedom
## Multiple R-squared:  0.006149,   Adjusted R-squared:  -0.0005209 
## F-statistic: 0.9219 on 1 and 149 DF,  p-value: 0.3385
## 
## Call:
## lm(formula = total_points ~ est, data = beta_ests_points_e_e)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -304.605  -36.510   -4.854   48.317  219.487 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   56.772     13.106   4.332 2.71e-05 ***
## est           58.972      6.908   8.537 1.47e-14 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 71.08 on 149 degrees of freedom
## Multiple R-squared:  0.3285, Adjusted R-squared:  0.324 
## F-statistic: 72.88 on 1 and 149 DF,  p-value: 1.468e-14

Figure 2D: Effect of choice weights on points earned

Relations between learning and memory

Do points earned during learning relate to memory?

Model: AUC by points earned

## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: AUC ~ age_scaled * points_scaled * abstraction * reward_condition +  
##     (1 | subject_id)
##    Data: data
## 
## REML criterion at convergence: -1249
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.4573 -0.5178  0.0325  0.6283  2.5841 
## 
## Random effects:
##  Groups     Name        Variance Std.Dev.
##  subject_id (Intercept) 0.005858 0.07654 
##  Residual               0.003619 0.06016 
## Number of obs: 608, groups:  subject_id, 151
## 
## Fixed effects:
##                                                           Estimate Std. Error
## (Intercept)                                              7.710e-01  6.843e-03
## age_scaled                                               1.277e-02  6.865e-03
## points_scaled                                            8.960e-03  4.357e-03
## abstraction1                                             6.032e-02  2.607e-03
## reward_condition1                                       -6.419e-03  2.675e-03
## age_scaled:points_scaled                                -3.026e-04  4.321e-03
## age_scaled:abstraction1                                  4.972e-04  2.655e-03
## points_scaled:abstraction1                               5.044e-03  2.941e-03
## age_scaled:reward_condition1                            -2.624e-03  2.755e-03
## points_scaled:reward_condition1                         -3.825e-03  3.593e-03
## abstraction1:reward_condition1                          -1.082e-04  2.607e-03
## age_scaled:points_scaled:abstraction1                    1.693e-04  2.780e-03
## age_scaled:points_scaled:reward_condition1              -4.781e-03  3.312e-03
## age_scaled:abstraction1:reward_condition1               -9.863e-04  2.655e-03
## points_scaled:abstraction1:reward_condition1             6.957e-03  2.941e-03
## age_scaled:points_scaled:abstraction1:reward_condition1  4.803e-03  2.780e-03
##                                                                 df t value
## (Intercept)                                              1.532e+02 112.665
## age_scaled                                               1.554e+02   1.859
## points_scaled                                            5.791e+02   2.057
## abstraction1                                             4.379e+02  23.134
## reward_condition1                                        4.485e+02  -2.400
## age_scaled:points_scaled                                 5.898e+02  -0.070
## age_scaled:abstraction1                                  4.379e+02   0.187
## points_scaled:abstraction1                               4.379e+02   1.715
## age_scaled:reward_condition1                             4.531e+02  -0.953
## points_scaled:reward_condition1                          5.070e+02  -1.065
## abstraction1:reward_condition1                           4.379e+02  -0.041
## age_scaled:points_scaled:abstraction1                    4.379e+02   0.061
## age_scaled:points_scaled:reward_condition1               4.987e+02  -1.443
## age_scaled:abstraction1:reward_condition1                4.379e+02  -0.372
## points_scaled:abstraction1:reward_condition1             4.379e+02   2.366
## age_scaled:points_scaled:abstraction1:reward_condition1  4.379e+02   1.728
##                                                         Pr(>|t|)    
## (Intercept)                                               <2e-16 ***
## age_scaled                                                0.0649 .  
## points_scaled                                             0.0402 *  
## abstraction1                                              <2e-16 ***
## reward_condition1                                         0.0168 *  
## age_scaled:points_scaled                                  0.9442    
## age_scaled:abstraction1                                   0.8515    
## points_scaled:abstraction1                                0.0870 .  
## age_scaled:reward_condition1                              0.3413    
## points_scaled:reward_condition1                           0.2876    
## abstraction1:reward_condition1                            0.9669    
## age_scaled:points_scaled:abstraction1                     0.9515    
## age_scaled:points_scaled:reward_condition1                0.1496    
## age_scaled:abstraction1:reward_condition1                 0.7104    
## points_scaled:abstraction1:reward_condition1              0.0184 *  
## age_scaled:points_scaled:abstraction1:reward_condition1   0.0848 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  AUC
Predictors Estimates SE
age scaled 0.0128 0.0069
points scaled 0.0090 0.0044
abstraction1 0.0603 0.0026
reward condition1 -0.0064 0.0027
age scaled × points
scaled
-0.0003 0.0043
age scaled × abstraction1 0.0005 0.0027
points scaled ×
abstraction1
0.0050 0.0029
age scaled × reward
condition1
-0.0026 0.0028
points scaled × reward
condition1
-0.0038 0.0036
abstraction1 × reward
condition1
-0.0001 0.0026
age scaled × points
scaled × abstraction1
0.0002 0.0028
age scaled × points
scaled × reward
condition1
-0.0048 0.0033
age scaled × abstraction1
× reward condition1
-0.0010 0.0027
points scaled ×
abstraction1 × reward
condition1
0.0070 0.0029
age scaled × points
scaled × abstraction1 ×
reward condition1
0.0048 0.0028
Random Effects
σ2 0.00
τ00 subject_id 0.01
ICC 0.62
N subject_id 151
Observations 608
Marginal R2 / Conditional R2 0.303 / 0.734

Figure 3B: AUC by performance group and reward condition

Do choice weights relate to memory?

Model: AUC by age, exemplar choice weights, specificity, block condition

  AUC
Predictors Estimates SE
age scaled 0.0097 0.0068
beta scaled 0.0180 0.0047
abstraction1 0.0610 0.0025
reward condition1 -0.0052 0.0026
age scaled × beta scaled 0.0159 0.0055
age scaled × abstraction1 0.0038 0.0025
beta scaled ×
abstraction1
-0.0044 0.0027
age scaled × reward
condition1
-0.0003 0.0026
beta scaled × reward
condition1
-0.0097 0.0031
abstraction1 × reward
condition1
-0.0001 0.0025
age scaled × beta scaled
× abstraction1
-0.0041 0.0030
age scaled × beta scaled
× reward condition1
-0.0075 0.0033
age scaled × abstraction1
× reward condition1
0.0011 0.0025
beta scaled ×
abstraction1 × reward
condition1
-0.0006 0.0027
age scaled × beta scaled
× abstraction1 × reward
condition1
0.0044 0.0030
Random Effects
σ2 0.00
τ00 subject_id 0.01
ICC 0.62
N subject_id 151
Observations 608
Marginal R2 / Conditional R2 0.322 / 0.741

Figure 3C: AUC by exemplar choice weights - model effects

Model: AUC by age, category choice weights, specificity, block condition

  AUC
Predictors Estimates SE
age scaled 0.0196 0.0072
beta scaled 0.0000 0.0043
abstraction1 0.0593 0.0029
reward condition1 -0.0076 0.0034
age scaled × beta scaled -0.0017 0.0042
age scaled × abstraction1 0.0025 0.0029
beta scaled ×
abstraction1
0.0070 0.0029
age scaled × reward
condition1
-0.0029 0.0034
beta scaled × reward
condition1
0.0001 0.0036
abstraction1 × reward
condition1
-0.0019 0.0029
age scaled × beta scaled
× abstraction1
-0.0012 0.0029
age scaled × beta scaled
× reward condition1
-0.0070 0.0036
age scaled × abstraction1
× reward condition1
0.0014 0.0029
beta scaled ×
abstraction1 × reward
condition1
0.0022 0.0029
age scaled × beta scaled
× abstraction1 × reward
condition1
-0.0023 0.0029
Random Effects
σ2 0.00
τ00 subject_id 0.01
ICC 0.64
N subject_id 151
Observations 608
Marginal R2 / Conditional R2 0.290 / 0.741

Figure 3C: AUC by category choice weights: model effects

Relations between age and other model parameters

Model: Initial Q values by age

  Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.7336 0.09476 7.742 1.38e-12
age_scaled -0.2009 0.09508 -2.113 0.03625
Fitting linear model: q_init ~ age_scaled
Observations Residual Std. Error \(R^2\) Adjusted \(R^2\)
151 1.164 0.0291 0.02258

Supplementary Figure: Initial Q values by age

Model: Alpha values by age

  Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.6771 0.07922 -8.547 1.39e-14
age_scaled 0.007934 0.07949 0.09982 0.9206
Fitting linear model: alpha ~ age_scaled
Observations Residual Std. Error \(R^2\) Adjusted \(R^2\)
151 0.9735 6.686e-05 -0.006644